package com.example.designpatterns.chain;

/**
 * DebugHandler类 - 处理DEBUG类型的请求
 */
public class DebugHandler extends Handler {
    
    public DebugHandler() {
        super("调试处理器");
    }
    
    @Override
    protected boolean canHandle(Request request) {
        return request.getType() == Request.RequestType.DEBUG;
    }
    
    @Override
    protected void doHandle(Request request) {
        System.out.println("调试处理器处理请求: " + request.getMessage());
        System.out.println("调试信息已记录，提供额外的上下文数据");
        request.setHandled(true);
    }
} 